72308471b619d951702cb68d6b5580d8988a52dd,community/kernel/src/main/java/org/neo4j/unsafe/impl/batchimport/ParallelBatchImporter.java,ParallelBatchImporter,doImport,#Input#,120
Before Change
// Remaining relationship processors
StoreProcessor<RelationshipRecord> relationshipLinkerProcessor =
new RelationshipLinkbackProcessor( nodeRelationshipLink );
RelationshipCountsProcessor relationshipCountsProcessor = new RelationshipCountsProcessor(
nodeLabelsCache, neoStore.getLabelRepository().getHighId(),
neoStore.getRelationshipTypeRepository().getHighId(), countsUpdater );
// Determine if we have enough available memory to be able to execute all remaining processors
// in parallel.
if ( disableParallelizationSinceItCausesWrongCountsComputations() &&
enoughAvailableMemoryForRemainingProcessors( nodeRelationshipLink ) )
{
// Stages 4, 5, 6 and 7
executeStages( new NodeStoreProcessorStage( "Node --> Relationship + Node counts", config,
neoStore.getNodeStore(), new StoreProcessor.Multiple<>(
nodeFirstRelationshipProcessor, nodeCountsProcessor ) ) );
nodeRelationshipLink.clearRelationships();
executeStages( new RelationshipStoreProcessorStage(
"Relationship --> Relationship + Relationship counts", config,
neoStore.getRelationshipStore(), new StoreProcessor.Multiple<>(
relationshipLinkerProcessor, relationshipCountsProcessor ) ) );
}
else
{
// Stage 4 -- set node nextRel fields
executeStages( new NodeFirstRelationshipStage( config, neoStore.getNodeStore(),
neoStore.getRelationshipGroupStore(), nodeRelationshipLink ) );
// Stage 5 -- link relationship chains together
nodeRelationshipLink.clearRelationships();
executeStages( new RelationshipLinkbackStage( config, neoStore.getRelationshipStore(),
nodeRelationshipLink ) );
// Release this potentially really big piece of cached data
nodeRelationshipLink.close();
After Change
neoStore.getRelationshipGroupStore(), nodeRelationshipLink ) );
// Stage 5 -- link relationship chains together
nodeRelationshipLink.clearRelationships();
executeStages( new RelationshipLinkbackStage( config, neoStore.getRelationshipStore(),
nodeRelationshipLink ) );
// Release this potentially really big piece of cached data
nodeRelationshipLink.close();